<?php
mysql_connect("localhost", "root", "") or
    die("Could not connect: " . mysql_error());
mysql_select_db($argv[1]);

$result = mysql_query("SHOW TABLES");

while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
    echo str_replace(' ','',ucwords(str_replace('_',' ',$row[0])))."\n";
}

mysql_free_result($result);
?>